package com.deuwise.system.entity.export;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.deuwise.common.validator.group.AddGroup;
import com.deuwise.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * Copyright
 *
 * @author chenwenchao
 * @date 2019/10/15
 * Description:
 */

@Data
public class DynamicFieldExport extends BaseRowModel {
    /**字段名称*/
    @ApiModelProperty("字段名称")
    @TableField("field_name")
    @ExcelProperty(value = "字段名称",index = 0)
    @NotBlank(message="字段名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String fieldName;

    /**字段*/
    @ApiModelProperty("字段")
    @TableField("field")
    @ExcelProperty(value = "字段",index = 1)
    @NotBlank(message="字段", groups = {AddGroup.class, UpdateGroup.class})
    private String field;

    /**正则*/
    @ApiModelProperty("正则")
    @TableField("regular")
    @ExcelProperty(value = "正则",index = 2)
    private String regular;

    /**图层类型*/
    @ApiModelProperty("图层类型")
    @TableField("layer_type_Id")
    @ExcelProperty(value = "图层类型",index = 3)
    @NotBlank(message="图层类型", groups = {AddGroup.class, UpdateGroup.class})
    private String layerTypeId;



    /**排序*/
    @ApiModelProperty("排序")
    @TableField("sort")
    @ExcelProperty(value = "排序",index = 4)
    private String sort;

    /**是否必填*/
    @ApiModelProperty("是否必填(是/否)")
    @TableField("not_null")
    @ExcelProperty(value = "是否必填(是/否)",index = 5)
    private String notNull;

    @ApiModelProperty("api版本号")
    @ExcelProperty(value = "api版本号",index = 6)
    private String version;
}
